Skip to content

tidy: Improve comment on np-special casing #10514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danra
Copy link

@danra danra commented Jul 8, 2025

np.astype became available in numpy 2.1

Copy link

welcome bot commented Jul 8, 2025

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@github-actions github-actions bot added topic-documentation topic-arrays related to flexible array support labels Jul 8, 2025
@danra
Copy link
Author

danra commented Jul 8, 2025

Looks like this is failing due to dask not having implemented np.astype. Not familiar with dask. Shall I just close this, or should this be amended somehow to only use np.astype in the numpy, non-dask case?

@keewis
Copy link
Collaborator

keewis commented Jul 8, 2025

it's not just that: we're still maintaining backwards compatibility with numpy<2 (see the bare-minimum CI), which means that we still need the special-casing for that, as well.

Either way, thanks for the PR. Unfortunately, I think this might not be the right time, yet.

Edit: but maybe you can repurpose the PR to make the comment more accurate? I.e. that this is for backwards-compat and dask?

@danra danra force-pushed the remove_np_special_case branch from 5e0f91a to feb81db Compare July 9, 2025 20:03
np.astype became available in numpy 2.1
@danra danra force-pushed the remove_np_special_case branch from feb81db to 0ef6138 Compare July 9, 2025 20:06
@danra
Copy link
Author

danra commented Jul 9, 2025

@keewis Done.
I still don't know why this is needed for dask - doesn't it use its own namespace? I've no experience with dask.
Perhaps you'd like to make that clearer in the comment and/or commit message (besides also telling me).

@danra danra changed the title tidy: Remove no longer needed np-special casing tidy: Improve comment on np-special casing Jul 9, 2025
@keewis
Copy link
Collaborator

keewis commented Jul 10, 2025

I think you force-pushed back to the original state (I think we need the changes from feb81db).

dask doesn't follow the array API (yet?), which explains the missing function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-arrays related to flexible array support topic-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants